<?php
// 学生证分页
require $this->website['path']['action'] . '/admin/isadmin.php';

$json = array('status' => 'ok', 'msg' => 'ok', 'data' => '');

$k = fn_post('k');
$p = fn_post('p', 1);

$num = 20;

$this->website['class']['db']
	->table('user_student')
	->order('id desc')
	->page($p)
	->num($num);
if ($k) {
	$this->website['class']['db']
		->where('tit like ?', '%' . $k . '%');
}
$data = $this->website['class']['db']->paging();
// $json['sql'] = $this->website['class']['db']->sql;

$json['data'] = $data;

$this->json_encode($json);